home *** CD-ROM | disk | FTP | other *** search
- property pSpr, pMinLeft, pMaxRight
-
- on beginSprite me
- pSpr = sprite(me.spriteNum)
- pMinLeft = 359
- pMaxRight = 450
- mUpdate(me)
- end
-
- on mUpdate me
- percent = getVolumePercent()
- pSpr.locH = pMinLeft + (percent * (pMaxRight - pMinLeft))
- end
-
- on mouseDown me
- repeat while the stillDown
- pSpr.locH = min(max(pMinLeft, the mouseH), pMaxRight)
- updateStage()
- end repeat
- end
-
- on mouseUp me
- mid = pSpr.locH - pMinLeft
- percent = float(mid) / (pMaxRight - pMinLeft)
- setVolumePercent(percent)
- mUpdateVolumeSlider(me)
- end
-
- on mUpdateVolumeSlider me
- global gMuteAllSounds
- if gMuteAllSounds then
- toggleMute(1)
- end if
- mUpdate(me)
- playBeepSound(getVolumePercent() * 255)
- end
-